///*
// * Copyright 2022-2025 兮玥(190785909@qq.com)
// *
// * Licensed under the Apache License, Version 2.0 (the "License");
// * you may not use this file except in compliance with the License.
// * You may obtain a copy of the License at
// *
// *     http://www.apache.org/licenses/LICENSE-2.0
// *
// * Unless required by applicable law or agreed to in writing, software
// * distributed under the License is distributed on an "AS IS" BASIS,
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// * See the License for the specific language governing permissions and
// * limitations under the License.
// */
//package com.chestnut.contentcore.controller;
//
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.chestnut.common.domain.R;
//import com.chestnut.common.log.annotation.Log;
//import com.chestnut.common.log.enums.BusinessType;
//import com.chestnut.common.security.anno.Priv;
//import com.chestnut.common.security.web.BaseRestController;
//import com.chestnut.common.security.web.PageRequest;
//import com.chestnut.common.utils.IdUtils;
//import com.chestnut.common.utils.ServletUtils;
//import com.chestnut.common.utils.SortUtils;
//import com.chestnut.contentcore.domain.CmsLinkGroup;
//import com.chestnut.contentcore.domain.CmsSite;
//import com.chestnut.contentcore.mapper.ILinkGroupService;
//import com.chestnut.contentcore.service.ISiteService;
//
//import lombok.RequiredArgsConstructor;
//import org.springframework.beans.BeanUtils;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
///**
// * <p>
// * 友情链接分组前端控制器
// * </p>
// *
// * @author 兮玥
// * @email 190785909@qq.com
// */
//@RequiredArgsConstructor
//@RestController
//@RequestMapping("/cms/linkdata")
//public class LinkGrouptwoController extends BaseRestController {
//
//	private final ISiteService siteService;
//
//	private final ILinkGroupService linkGroupService;
//
////	@Priv(type = AdminUserType.TYPE, value = FriendLinkPriv.View)
//	@GetMapping
//	public R<?> getPageList(@RequestParam(value = "query", required = false) String query) {
//		CmsSite site = this.siteService.getCurrentSite(ServletUtils.getRequest());
//		PageRequest pr = this.getPageRequest();
//		LambdaQueryWrapper<CmsLinkGroup> q = new LambdaQueryWrapper<CmsLinkGroup>()
////				.eq(CmsLinkGroup::getSiteId, site.getSiteId())
////				.like(StringUtils.isNotEmpty(query), CmsLinkGroup::getName, query)
//				.orderByAsc(CmsLinkGroup::getSortFlag);
//		Page<CmsLinkGroup> page = this.linkGroupService.page(new Page<>(pr.getPageNumber(), pr.getPageSize(), true), q);
//		return this.bindDataTable(page);
//	}
//	@GetMapping("/getList")
//	public R<?> getList(@RequestParam(value = "query", required = false) String query) {
////		CmsSite site = this.siteService.getCurrentSite(ServletUtils.getRequest());
//		PageRequest pr = this.getPageRequest();
//		LambdaQueryWrapper<CmsLinkGroup> q = new LambdaQueryWrapper<CmsLinkGroup>()
////				.eq(CmsLinkGroup::getSiteId, site.getSiteId())
////				.like(StringUtils.isNotEmpty(query), CmsLinkGroup::getName, query)
//				.orderByAsc(CmsLinkGroup::getSortFlag);
//		Page<CmsLinkGroup> page = this.linkGroupService.page(new Page<>(pr.getPageNumber(), pr.getPageSize(), true), q);
//		return this.bindDataTable(page);
//	}
//
//}
